import request from '@/utils/request'

export function tenants(data) {
  return request({
    url: 'admin/cmd/v1/label',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: 'admin/cmd/v1/label',
    method: 'delete',
    data
  })
}

export function get(id) {
  return request({
    url: 'admin/cmd/v1/label/' + id,
    method: 'get'
  })
}

export function saveOrUpdate(data) {
  return request({
    url: 'admin/cmd/v1/label',
    method: 'put',
    data
  })
}

export function merge(id, data) {
  return request({
    url: 'admin/cmd/v1/label/merge/' + id,
    method: 'post',
    data
  })
}

export function tree(id) {
  return request({
    url: 'admin/cmd/v1/label/tree/' + id,
    method: 'get'
  })
}

export function all() {
  return request({
    url: 'admin/cmd/v1/label/all',
    method: 'get'
  })
}

export function listMenu(id) {
  return request({
    url: 'admin/cmd/v1/label/menu/' + id,
    method: 'get'
  })
}